<!DOCTYPE html>
<html>
<head>
<script src="../js/jquery-1.11.1.min.js"></script>
<script src="../js/inserimentoCaratteristiche.js"></script>
<script src="../js/GestioneCookie.js"></script>
<!-- Java Script per la gestione della barra -->

<!-- Css della barra -->
<link href="../css/BarraCSS.css" rel="stylesheet" type="text/css">
<script src="../js/BarraJs.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- Css della pagina -->
<link href="../css/indexBootCSS.css" rel="stylesheet" type="text/css">
<meta charset="ISO-8859-1">
<title>Assemblaggio Manuale Assistito</title>

<!-- META -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- META -->
<!-- CSS -->
<link href="../css/bootstrap.min.css" rel="stylesheet" media="screen">
<!-- CSS -->


</head>
<body>

	<div class="row affix-row">
		<div class="col-sm-3 col-md-2 affix-sidebar">
			<div class="sidebar-nav">
				<div class="navbar navbar-default" role="navigation">
					<div class="navbar-header">
						<button type="button" class="navbar-toggle" data-toggle="collapse"
							data-target=".sidebar-navbar-collapse">
							<span class="sr-only">Toggle navigation</span> <span
								class="icon-bar"></span> <span class="icon-bar"></span> <span
								class="icon-bar"></span>
						</button>
						<span class="visible-xs navbar-brand">Sidebar menu</span>
					</div>
					<div class="navbar-collapse collapse sidebar-navbar-collapse">
						<ul class="nav navbar-nav" id="sidenav01">
							<li class="active"><a href="indexBoot.html"
								data-toggle="collapse" data-target="#toggleDemo0"
								data-parent="#sidenav01" class="collapsed">
									<div>
										<img src="logo.jpg" alt="logo">
									</div>
							</a></li>

							<li><a href="indexBoot.html"> <span
									class="glyphicon glyphicon-home"></span> HomePage
							</a></li>

							<li><a href="ChiSiamo.html" class="collapsed"> <span
									class="glyphicon glyphicon-inbox"></span> Chi Siamo
							</a></li>

							<li><a href="#" data-toggle="collapse"
								data-target="#toggleDemo" data-parent="#sidenav01"
								class="collapsed"> <span class="glyphicon glyphicon-wrench"></span>
									Assemblaggio <span class="caret pull-right"></span>
							</a>
								<div class="collapse" id="toggleDemo" style="height: 0px;">
									<ul class="nav nav-list">
										<li><a href="Automatico.html">Automatico</a></li>
										<li><a href="ManualeAssistito.html">Manuale Assistito</a></li>
									</ul>
								</div></li>

							<li><a href="Contatti.html"><span
									class="glyphicon glyphicon-phone"></span> Contatti</a></li>
							<li><a href="Login.html"><span
									class="glyphicon glyphicon-user"></span> Login</a></li>
						</ul>
					</div>
					<!--/.nav-collapse -->
				</div>
			</div>
		</div>
		<div class="col-sm-9 col-md-10 affix-content">
			<div class="container">

				<div class="page-header">
					<div id="logged">
						<table id="logged">
							<tr id="info">
								<td id="user"></td>
								<td id="pagina_personale"></td>
								<td id="logout"></td>
							</tr>
						</table>
					</div>
					<h3>
						<script>
							document.write(document.title)
						</script>
					</h3>
				</div>

				<!-- Barra dei Menu -->
				<div class="container">
					<div class="row">
						<div id="bc1" class="btn-group btn-breadcrumb">
							<div class="btn btn-default">
								<a href="ManualeAssistito.html"><b>Processore</b></a>
							</div>
							<div class="btn btn-default">
								<a href="MStep2.html">Scheda Madre</a>
							</div>
							<div class="btn btn-default">
								<a href="MStep3.html">Scheda Video</a>
							</div>
							<div class="btn btn-default">
								<a href="MStep4.html">Ram</a>
							</div>
							<div class="btn btn-default">
								<a href="MStep5.html">Hard disk</a>
							</div>	
							<div class="btn btn-default">
								<a href="MStep6.html">Lettore ottico</a>
							</div>						
							<div class="btn btn-default">
								<a href="MStep7.html">Dissipatore</a>
							</div>
							<div class="btn btn-default">
								<a href="MStep8.html">Ventola</a>
							</div>
							<div class="btn btn-default">
								<a href="MStep9.html">Monitor</a>
							</div>
							<div class="btn btn-default">
								<a href="MStep10.html">Alimentatore</a>
							</div>
							<div class="btn btn-default">
								<a href="MStep11.html">Periferiche</a>
							</div>
						</div>
					</div>
					<br>
					<!-- Fine Barra dei Menu -->
					<div class="result">
						<input type="hidden" id="categoria" value="pr" />
						
						<h3>Segli la categoria di processori:</h3>
						<select id="scelta_processori">
							<option value="Intel">Intel</option>
							<option value="AMD">AMD</option>
						</select>
						<p>
						<div class="risultato-server"></div>
						<input type="button" id="bottone" class="bottone" value="Conferma"
							style="width: 11%">
					</div>
				</div>
			</div>
		</div>
		<!-- JS -->
		<!-- <script src="//code.jquery.com/jquery.js"></script>-->
		<script>
		window.onload = function() {
			if(estraiCookie("nome")!="")
			 {  
				$("#user").html("Benvenuto "+ estraiCookie("nome")+" !");
				$("#pagina_personale").html("<a href="+estraiCookie("page")+">" +"pagina personale</a>");
				$("#logout").html("Logout");
			 }
			$.ajax({
				url : 'RimuoviElemento.jsp',
				type : 'POST',
				data : {
					count : 1
				} ,
				dataType : 'html',
				success : function(data) {
					$("div#logged").append(data);
					var r=parseInt($('input#num_elemento').val());
					if(r>0){
						r=r+1;
						if(r<13)
							$("div#logged").next().after('<a href="MStep'+r+'.html"><h3 style="margin:0px;position:relative;left:93%;width:60px;">(1) <i class="fa fa-shopping-cart"></i></h3></a>');
						else
							$("div#logged").next().after('<a href="CreazioneOrdine.jsp"><h3 style="margin:0px;position:relative;left:93%;width:60px;">(1) <i class="fa fa-shopping-cart"></i></h3></a>');
					}
				}
			});
			$.ajax({
				url : 'ApplicazioneAlgoritmi.jsp',
				type : 'POST',
				data : {
					scelta : 'Intel',
					categoria : $('input#categoria').val()
				},
				dataType : 'html',
				success : function(data) {
					$('.risultato-server').html(data);
				}
			})
		}
			$('#scelta_processori').change(
					function() {
						scelta_eseguita = document
								.getElementById("scelta_processori").value;
						$.ajax({
							url : 'ApplicazioneAlgoritmi.jsp',
							type : 'POST',
							data : {
								scelta : scelta_eseguita,
								categoria : $('input#categoria').val()
							},
							dataType : 'html',
							success : function(data) {
								$('.risultato-server').html(data);
							}
						})
					})
			$('#bottone').click(
					function() {
						scelta_eseguita = document
						.getElementById("scelta_processori").value;
						$.ajax({
							url : 'ApplicazioneAlgoritmi.jsp',
							type : 'POST',
							data : {
								elemento_scelto : $(
										"input[type='radio']:checked").val(),
								scelta : scelta_eseguita,
								categoria : $('input#categoria').val()
							},
							dataType : 'html',
							success : function(data) {
								document.location.href = "MStep2.html";
							}
						})
					})
		</script>

		<script src="../js/bootstrap.min.js"></script>
		<!--  -->
</body>
</html>